package com.main.ok.test;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
 /**
  * 
  * @Type ClassloadingLock
  * @Desc 
  * @author shuai.zuo
  * @date 2015年3月9日
  * @Version V1.0
  */
public class ClassloadingLock {
  static class Worker extends Thread {
    @Override
    public void run() {
      while (true) {
        try {
          DocumentBuilder b = DocumentBuilderFactory.newInstance()
              .newDocumentBuilder();
 
        } catch (Exception e) {// Do not do this at home, log all
          // exceptions
        }
      }
    }
  }
 
  public static void main(String[] args) throws Exception {
    for (int i = 0; i < 100; i++) {
      new Worker().start();
    }
  }
 
}
